package com.behavior.command;

public class CommandTest {
  
	public static void main(String[] args) {
	
		Electric electric = new Fan();

		Command commandOn = new FanOnCommand(electric);
		Command commandOff = new FanOffCommand(electric);

		RemoteControl control = new RemoteControl();

		control.setCommand(commandOn);
		control.action();

		control.setCommand(commandOff);
		control.action();
  }
}
